<!DOCTYPE html>
<html lang="en">
    
    <head>
        <!-- Basic Needs -->
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>{% block title %}Adibilis{% endblock %}</title>
        <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
        <!-- Fonts -->
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,800' rel='stylesheet' type='text/css'>{% block stylesheets %}
        <!-- CSS Stylesheets -->
        
        <link href="{{ asset('css/bootstrap-responsive.css') }}" rel="stylesheet">
        
        {% if app.request.cookies.get('presentation') == 'inverse' %}
       		<link href="{{ asset('css/bootstrapInverse.css') }}" rel="stylesheet">
        	<link href="{{ asset('css/styleInverse.css') }}" rel="stylesheet" title="inverse">
        	<link rel="stylesheet" href="{{ asset('DataTables-1.9.4/media/css/demo_tableInverse.css') }}" type="text/css" />
        {% else %}
        	<link href="{{ asset('css/bootstrap.css') }}" rel="stylesheet">
        	<link href="{{ asset('css/style.css') }}" rel="stylesheet" title="default">
        	<link rel="stylesheet" href="{{ asset('DataTables-1.9.4/media/css/demo_table.css') }}" type="text/css" />
        {% endif %}
        
        <link href="{{ asset('css/font-awesome.css') }}" rel="stylesheet">
        <link href="{{ asset('css/animate.css') }}" rel="stylesheet">
        <link href="{{ asset('css/prettyPhoto.css') }}" rel="stylesheet">
        {% endblock %}
        <!-- Favicon Icon -->
        <link rel="shortcut icon" href="ico/favicon.png">
        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        
		
    </head>
    
    <body>
        <!-- Start header -->
        <header class="header">
            <div class="container">
                <div class="navbar">
                    <div class="navbar-inner">
                        <div class="brand-wrapper">
                            <a class="brand" href="{{ path('adibilisadmin_home') }}">
                                <img style="width: 44px;" src="/adibilis/web/img/adibilis.png" />
                                </span>
                            </a>
                        </div>

                        <!-- Added pages -->
                        {% render "adibilisadminBundle:Page:test" %}


                        <!-- Pages -->
                        {% if app.user and is_granted('ROLE_ADMIN') %}
                       
                        
                        
                        <ul class="nav">
                            <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">  
                        {{ 'layout.menu.pages.title'|trans }} 
                        <b class="caret"></b>  
                      </a> 
                                <ul class="dropdown-menu">
                                    <li><a href="{{ path('page') }}">{{ 'layout.menu.pages.liste'|trans }} </a>
                                    </li>
                                    <li><a href="{{ path('page_new') }}">{{ 'layout.menu.pages.add'|trans }} </a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                        {% endif %}

                        <!-- About -->
                        <ul class="nav">
                            <li><a href="{{ path('adibilisadmin_about') }}">{{ 'layout.menu.about'|trans }}</a>
                            </li>
                        </ul>

                      <!-- Passport -->
                        <ul class="nav">
                            <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">  
                            {{ 'layout.menu.pass.title'|trans }} 
                            <b class="caret"></b>  
                          </a> 
                                <ul class="dropdown-menu">
                                    <li><a href="{{ path('passorder') }}">{{ 'layout.menu.pass.desc'|trans }}</a>
                                    </li>
                                    <li><a href="{{ path('passorder_new') }}">{{ 'layout.menu.pass.add'|trans }}</a>
                                    </li>{% if app.user and is_granted('ROLE_ADMIN') %}
                                    <li><a href="{{ path('passorder_list') }}">{{ 'layout.menu.pass.liste'|trans }}</a>
                                    </li>{% endif %}</ul>
                            </li>
                        </ul>



                        <!-- Catégories -->
                        {% if app.user and is_granted('ROLE_ADMIN') %}
                        <ul class="nav">
                            <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">  
                                {{ 'layout.menu.categories.title'|trans }} 
                                <b class="caret"></b>  
                              </a> 
                                <ul class="dropdown-menu">
                                    <li><a href="{{ path('category') }}">{{ 'layout.menu.categories.liste'|trans }}</a>
                                    </li>
                                    <li><a href="{{ path('category_new') }}">{{ 'layout.menu.categories.add'|trans }}</a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                        {% endif %}

                        <!-- Localités -->
                        {% if app.user and is_granted('ROLE_ADMIN') %}
                        <ul class="nav">
                            <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">  
                                Localités
                                <b class="caret"></b>  
                              </a> 
                                <ul class="dropdown-menu">
                                    <li><a href="{{ path('locality') }}">Liste des localités</a>
                                    </li>
                                    <li><a href="{{ path('locality_new') }}">Ajouter une localité</a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                        {% endif %}

                        <!-- Critères -->
                        {% if app.user and is_granted('ROLE_ADMIN') %}
                        <ul class="nav">
                            <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">  
                                Critères
                                <b class="caret"></b>  
                              </a> 
                                <ul class="dropdown-menu">
                                    <li><a href="{{ path('criteria') }}">Liste des critères</a>
                                    </li>
                                    <li><a href="{{ path('criteria_new') }}">Ajouter un critère</a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                        {% endif %}


                        <!-- Activités -->
                        <ul class="nav">
                            <!-- <li class="active"><a href="{{ path('adibilisadmin_home') }}">Accueil</a></li> -->
                            <!-- <li><a href="{{ path('adibilisadmin_ajouter') }}">test</a></li> -->
                            <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">  
                                    {{ 'layout.menu.activites.title'|trans }}
                                    <b class="caret"></b>  
                                  </a> 
                                <ul class="dropdown-menu">
                                    <li><a href="{{ path('adibilisadmin_acceuil') }}">{{ 'layout.menu.activites.liste'|trans }}</a>
                                    </li>
                                    <li><a href="{{ path('adibilisadmin_nearActivities') }}">{{ 'layout.menu.activites.near'|trans }}</a>
                                    </li>
                                    {% if app.user and is_granted('ROLE_ADMIN') %}
                                    <li><a href="{{ path('adibilisadmin_ajouter') }}">{{ 'layout.menu.activites.add'|trans }}</a>
                                    </li>
                                    {% endif %}
                                </ul>
                            </li>
                        </ul>


                        <!-- Actualités -->
                        <ul class="nav">
                            <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">  
                            {{ 'layout.menu.news.title'|trans }} 
                            <b class="caret"></b>  
                          </a> 
                                <ul class="dropdown-menu">
                                    <li><a href="{{ path('article', {'page': 1}) }}">{{ 'layout.menu.news.liste'|trans }} </a>
                                    </li>{% if app.user and is_granted('ROLE_ADMIN') %}
                                    <li><a href="{{ path('article_new') }}">{{ 'layout.menu.news.add'|trans }} </a>
                                    </li>{% endif %}</ul>
                            </li>
                        </ul>


                      </div>
                </div>
            </div>
        </header>
        <div class="container">



            <div id="content" class="span12">
                <a onclick="enlargeText()"> <img style="width: 35px; opacity:0.4;" src="/adibilis/web/img/fontbig.png" alt="fontbig" /> </a>
                <a onclick="reduceText()"> <img style="width: 35px; opacity:0.4;"  src="/adibilis/web/img/fontsmall.png" alt="fontsmall" /> </a>
                
                {% if app.request.cookies.get('presentation') == 'inverse' %}
       				<a href=""{{ path('adibilisadmin_home') }}"" onclick="changeStyle()"> <img style="width: 35px; opacity:0.4;"  src="/adibilis/web/img/StyleBlanc.png" alt="fontsmall" /></a>
       			{% else %}
        			<a href=""{{ path('adibilisadmin_home') }}"" onclick="changeStyle()"> <img style="width: 35px; opacity:0.4;"  src="/adibilis/web/img/StyleInverse.png" alt="fontsmall" /></a>
        		{% endif %}

                {% block body %} {% endblock %}</div>
        </div>
        <!-- Start footer -->
        <footer class="footer">
            <div class="container">
                <div class="row">
                    <div class="span5 about">
                         <h5>{{ 'layout.menu.about'|trans }}</h5>

                        <p>Adibilis: Une entreprise de l’Association Business eXperience</p>
                        <dl> <dt>{{ 'layout.address'|trans }}</dt>

                            <dd> <strong>Adibilis</strong>
                                <br>Une entreprise de l’Association Business eXperience
                                <br>Techno-Pôle 3
                                <br>3960 Sierre</dd> <dt>E-mail:</dt>

                            <dd><a href="mailto:mail@domain.com">info@adibilis.ch</a>
                            </dd> <dt></dt>

                            <dd>
                                </br>
                                <img style="width: 100px;" src="/adibilis/web/img/adibilis.png" />
                            </dd>
                        </dl>
                    </div>
                    <div class="span5 recent-post">
                         <h5>{{ 'article.index.recent'|trans }}</h5>

                        <ul>{% render "adibilisadminBundle:Article:lastnews" with {nombre: 3} %}</ul>
                    </div>
                    <div class="span2">{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %} <span>    {{ 'layout.connected'|trans }} </br> </span>  <a href="{{ path('fos_user_profile_show') }}"> {{ app.user.username }} </a>- <a href="{{ path('fos_user_security_logout') }}">{{ 'layout.disconnect'|trans }}</a>
                        {%else %} 
                        <a href="{{ path('fos_user_registration_register') }}">{{ 'layout.inscription'|trans }}</a>
                        | <a href="{{ path('fos_user_security_login') }}">{{ 'layout.connect'|trans }}</a>
                        {% endif %}
                        </br>
                        </br>
                        </br>
                        </br>
                      
                    </div>
                </div>
            </div>
        </footer>
        <!-- End footer -->
        <!-- Start socket -->
        <section class="socket">
            <div class="container">
                <div class="row">
                    <div class="span6"> <span>© 2013 Adibilis. All rights reserved.</span> 
                    </div>
                    <div class="span6">
                        <ul class="social-links">
                            <li>  
                                <a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'fr'})) }}">
                                    <img style="width: 20px;" src="/adibilis/web/img/fr.png" alt="fr" />
                                </a>
                                <a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'en'})) }}">
                                    <img style="width: 20px;"src="/adibilis/web/img/en.png" alt="en" />
                                </a>
                                <a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'de'})) }}">
                                    <img style="width: 20px;" src="/adibilis/web/img/de.png" alt="de" />
                                </a>
                            </li>
                            <li>{{ 'layout.social'|trans }}</li>
                            <li><a href="https://www.facebook.com/pages/Adibilis/443717045702718"><i class="icon-facebook"></i></a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>
        <!-- End socket -->
        <!-- Le javascript -->
        <!-- Placed at the end of the document so the pages load faster -->

        {% block javascripts %}
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script type="text/javascript" src="{{ asset('js/jquery-ui-1.8.1.custom.min.js') }}"></script>
        <!-- <script type="text/javascript" src="{{ asset('js/jquery-1.8.3.js') }}"></script> -->
        <script type="text/javascript" src="{{ asset('js/bootstrap.min.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/jquery.onecarousel.min.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/main.js') }}"></script>
        <script type="text/javascript" src="{{ asset('ckeditor/ckeditor.js') }}"></script>
        <script type="text/javascript" charset="utf-8" src="{{ asset('DataTables-1.9.4/media/js/jquery.dataTables.js') }}"></script>
        <script type="text/javascript" charset="utf-8" src="{{ asset('DataTables-1.9.4/media/js/jquery.dataTables.columnFilter.js') }}"></script>





        <script language="Javascript">function setBackground(){
            alert('dslfj'); //document.getElementById('content')
            document.getElementById('content').style.backgroundColor='#727272'; 
            document.body.style.fontSize= '18px';
        } </script>
        
        <script language="Javascript">function enlargeText(){
            switch(document.body.style.fontSize) {
                case 'large': document.body.style.fontSize= 'x-large';
                    document.body.style.lineHeight= '28px';
                    var rows = document.getElementById('table_id').getElementsByTagName('tbody')[0].getElementsByTagName('tr');
                    for (var i = 0; i < rows.length; i++) {
                    	rows[i].getElementsByTagName('td')[1].style.lineHeight= '28px';
                    	rows[i].getElementsByTagName('td')[2].style.lineHeight= '28px';
                    }
                    break;
                case 'x-large': document.body.style.fontSize= 'xx-large';
                    document.body.style.lineHeight= '35px';
                    var rows = document.getElementById('table_id').getElementsByTagName('tbody')[0].getElementsByTagName('tr');
                    for (var i = 0; i < rows.length; i++) {
                    	rows[i].getElementsByTagName('td')[1].style.lineHeight= '35px';
                    	rows[i].getElementsByTagName('td')[2].style.lineHeight= '35px';
                    }
                case 'xx-large':
                    break;
                default: document.body.style.fontSize= 'large';
            }
        } </script>
        
        <script language="Javascript">function reduceText(){
            switch(document.body.style.fontSize) {
                case 'xx-large': document.body.style.fontSize= 'x-large';
                    document.body.style.lineHeight= '28px';
                    var rows = document.getElementById('table_id').getElementsByTagName('tbody')[0].getElementsByTagName('tr');
                    for (var i = 0; i < rows.length; i++) {
                    	rows[i].getElementsByTagName('td')[1].style.lineHeight= '28px';
                    	rows[i].getElementsByTagName('td')[2].style.lineHeight= '28px';
                    }
                    break;
                case 'x-large': document.body.style.fontSize= 'large';
                    document.body.style.lineHeight= '20px';
                    var rows = document.getElementById('table_id').getElementsByTagName('tbody')[0].getElementsByTagName('tr');
                    for (var i = 0; i < rows.length; i++) {
                    	rows[i].getElementsByTagName('td')[1].style.lineHeight= '20px';
                    	rows[i].getElementsByTagName('td')[2].style.lineHeight= '20px';
                    }
                    break;
                default: document.body.style.fontSize= '12px';
            }
        } </script>
        
        <script language="Javascript">function setCookie(c_name,value,exdays) {
            var exdate=new Date();
            exdate.setDate(exdate.getDate() + exdays);
            var c_value=escape(value) + ((exdays==null) ? '' : '; expires='+exdate.toUTCString());
            document.cookie=c_name + '=' + c_value; 
        } </script>
        
        <script language="Javascript">function getCookie(c_name) {
            var c_value = document.cookie;
            var c_start = c_value.indexOf(" " + c_name + "=");
            if (c_start == -1) {
                c_start = c_value.indexOf(c_name + "=");
            }
            if (c_start == -1) {
                c_value = null;
            }
            else {
                c_start = c_value.indexOf("=", c_start) + 1;
                var c_end = c_value.indexOf(";", c_start);
                if (c_end == -1) {
                    c_end = c_value.length;
                }
                c_value = unescape(c_value.substring(c_start,c_end));
            }
            return c_value;
        } </script>
        
        <script language="Javascript">function changeStyle(){
            if (getCookie('presentation') == 'inverse') {
                setCookie('presentation', 'default', 1)
            }
            else {
                setCookie('presentation', 'inverse', 1)
            }
        } </script>








        <script type="text/javascript">

              var _gaq = _gaq || [];
              _gaq.push(['_setAccount', 'UA-40555155-1']);
              _gaq.push(['_trackPageview']);

              (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
              })();

        </script>


        {% endblock %}


    </body>

</html>